package com.ch999.detect.View.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.ch999.detect.R;
import com.ch999.detect.View.SelectStartDialog;

/**
 * Created by Administrator on 2016/12/13 0013.
 */

public class NetTitleDialog extends SelectStartDialog {

    View.OnClickListener listener;
    private TextView mTvTitle;

    public NetTitleDialog(Context context, View.OnClickListener listener) {
        super(context);
        this.listener = listener;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_net_title_layout);

        setCanceledOnTouchOutside(false);
        findViewById(R.id.btn_normal).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
                if (listener != null) {
                    listener.onClick(view);
                }
            }
        });

        mTvTitle = (TextView) findViewById(R.id.tv_title);

      /*  findViewById(R.id.btn_unnormal).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (listener != null) {
                    listener.onClick(view);
                }
            }
        });*/

    }


    public void show(String title) {
        super.show();
        mTvTitle.setText(title);
    }
}
